***************************************************************
******** REPLICATION FILE FOR BUREAUCRACY AND GROWTH **********
***************************************************************

use "C:\Users\carlhk\Dropbox\Bureaucracy and growth\Analysis\Replication_data_CPS\Replication_data_Bureaucracy_Growth.dta", clear


keep country_id year country_name s_far_Maddison_gdppc_1990_estima s_far_Maddison_pop_estimate s_mil_loggdp v2stcritrecadm v2clrspct v2excrptps v2exthftps v2strenadm v3struinvadm v2x_polyarchy e_wbgi_gee s_democ_unlit_percent s_bl_25t_yr_sch s_mil_gdp_grow v2svindep s_mil_resdep2 s_mil_lnpop s_hen_pctlit QoG_expert_q2_a QoG_expert_q2_b QoG_expert_q2_c QoG_expert_q2_e QoG_expert_q7 v2stcritrecadmv9 v2clrspctv9 v2svindepv9

replace s_far_Maddison_gdppc_1990_estima = . if year ==2015
replace s_far_Maddison_pop_estimate = . if year ==2015

xtset country_id year 
sort country_id year

**************************
**Constructing variables** 
**************************

**Evans Rauch collect data from 1993--1996, assign scores to 1995.
generate evra_weber =.
replace evra_weber = 3.8 if year==1995& country_name=="Argentina" 
replace evra_weber = 7.6 if year==1995& country_name=="Brazil" 
replace evra_weber = 5 if year==1995& country_name=="Chile" 
replace evra_weber = 8.5 if year==1995& country_name=="Colombia" 
replace evra_weber = 9 if year==1995& country_name=="Costa Rica" 
replace evra_weber = 8 if year==1995& country_name=="Ivory Coast" 
replace evra_weber = 2 if year==1995& country_name=="Dominican Republic" 
replace evra_weber =  4 if year==1995& country_name=="Ecuador" 
replace evra_weber = 7.8 if year==1995& country_name=="Egypt" 
replace evra_weber = 10 if year==1995& country_name=="Greece" 
replace evra_weber = 3 if year==1995& country_name=="Guatemala" 
replace evra_weber =  4 if year==1995& country_name=="Haiti" 
replace evra_weber = 11 if year==1995& country_name=="Hong Kong" 
replace evra_weber = 10 if year==1995& country_name=="India" 
replace evra_weber = 7 if year==1995& country_name=="Israel" 
replace evra_weber = 1 if year==1995& country_name=="Kenya" 
replace evra_weber =  13 if year==1995& country_name=="South Korea" 
replace evra_weber = 10.5 if year==1995& country_name=="Malaysia" 
replace evra_weber = 8.5 if year==1995& country_name=="Mexico" 
replace evra_weber =  7 if year==1995& country_name=="Morocco" 
replace evra_weber = 3 if year==1995& country_name=="Nigeria" 
replace evra_weber = 11 if year==1995& country_name=="Pakistan" 
replace evra_weber = 5 if year==1995& country_name=="Peru" 
replace evra_weber = 6 if year==1995& country_name=="Philippines" 
replace evra_weber = 5 if year==1995& country_name=="Portugal" 
replace evra_weber = 13.5 if year==1995& country_name=="Singapore" 
replace evra_weber = 10 if year==1995& country_name=="Spain" 
replace evra_weber = 8 if year==1995& country_name=="Sri Lanka" 
replace evra_weber = 3.8 if year==1995& country_name=="Syria" 
replace evra_weber = 12 if year==1995& country_name=="Taiwan" 
replace evra_weber = 8 if year==1995& country_name=="Thailand" 
replace evra_weber = 9 if year==1995& country_name=="Tunisia" 
replace evra_weber = 7 if year==1995& country_name=="Turkey" 
replace evra_weber = 4.5 if year==1995& country_name=="Uruguay" 
replace evra_weber = 4 if year==1995& country_name=="Democratic Republic of Congo" 


generate evra_sample=0
replace evra_sample = 1 if country_name=="Argentina" 
replace evra_sample = 1 if  country_name=="Brazil" 
replace evra_sample = 1 if  country_name=="Chile" 
replace evra_sample = 1 if  country_name=="Colombia" 
replace evra_sample = 1 if  country_name=="Costa Rica" 
replace evra_sample = 1 if  country_name=="Ivory Coast" 
replace evra_sample = 1 if  country_name=="Dominican Republic" 
replace evra_sample =  1 if  country_name=="Ecuador" 
replace evra_sample = 1 if  country_name=="Egypt" 
replace evra_sample = 1 if  country_name=="Greece" 
replace evra_sample = 1 if  country_name=="Guatemala" 
replace evra_sample =  1 if  country_name=="Haiti" 
replace evra_sample = 1 if  country_name=="Hong Kong" 
replace evra_sample = 1 if  country_name=="India" 
replace evra_sample = 1 if  country_name=="Israel" 
replace evra_sample = 1 if  country_name=="Kenya" 
replace evra_sample =  1 if country_name=="South Korea" 
replace evra_sample = 1 if country_name=="Malaysia" 
replace evra_sample = 1 if  country_name=="Mexico" 
replace evra_sample =  1 if  country_name=="Morocco" 
replace evra_sample = 1 if  country_name=="Nigeria" 
replace evra_sample = 1 if  country_name=="Pakistan" 
replace evra_sample = 1 if  country_name=="Peru" 
replace evra_sample = 1 if  country_name=="Philippines" 
replace evra_sample = 1 if  country_name=="Portugal" 
replace evra_sample = 1 if  country_name=="Singapore" 
replace evra_sample = 1 if country_name=="Spain" 
replace evra_sample = 1 if  country_name=="Sri Lanka" 
replace evra_sample = 1 if  country_name=="Syria" 
replace evra_sample = 1 if  country_name=="Taiwan" 
replace evra_sample = 1 if  country_name=="Thailand" 
replace evra_sample = 1 if  country_name=="Tunisia" 
replace evra_sample = 1 if  country_name=="Turkey" 
replace evra_sample = 1 if  country_name=="Uruguay" 
replace evra_sample = 1 if  country_name=="Democratic Republic of Congo" 


**Creating variables:
*Growth variables
generate absGDPpc = exp(s_mil_loggdp)
by country_id, sort: generate f20absGDPpc = f20.absGDPpc 
generate twenty_year_growth_rate =(((f20absGDPpc/absGDPpc)^(1/20))-1)*100

by country_id, sort: generate gdppcgrowth_F_M = (s_far_Maddison_gdppc_1990_estima - L.s_far_Maddison_gdppc_1990_estima)*100
by country_id, sort: generate gdppcgrowth_F_M_25 = (s_far_Maddison_gdppc_1990_estima - L25.s_far_Maddison_gdppc_1990_estima)/25*100
by country_id, sort: generate gdppcgrowth_F_M_20 = (s_far_Maddison_gdppc_1990_estima - L20.s_far_Maddison_gdppc_1990_estima)/20*100
**Growth across different time spans
sort country_id year
by country_id, sort: generate gdppcgrowth_F_M_100 = (s_far_Maddison_gdppc_1990_estima - L100.s_far_Maddison_gdppc_1990_estima)/100*100
*used for time lag 1789-1913
by country_id, sort: generate gdppcgrowth_F_M_125 = (s_far_Maddison_gdppc_1990_estima - L125.s_far_Maddison_gdppc_1990_estima)/125*100
*used 1798-1913
by country_id, sort: generate gdppcgrowth_F_M_115 = (s_far_Maddison_gdppc_1990_estima - L115.s_far_Maddison_gdppc_1990_estima)/115*100
*used 1815-1913
by country_id, sort: generate gdppcgrowth_F_M_98 = (s_far_Maddison_gdppc_1990_estima - L98.s_far_Maddison_gdppc_1990_estima)/98*100
*Used 1824-1913
by country_id, sort: generate gdppcgrowth_F_M_89 = (s_far_Maddison_gdppc_1990_estima - L89.s_far_Maddison_gdppc_1990_estima)/89*100

**generate averages past decade for institutional variables
by country_id, sort: generate meanl10_v2stcritrecadm =(v2stcritrecadm+ l1.v2stcritrecadm+ l2.v2stcritrecadm+ l3.v2stcritrecadm+ l4.v2stcritrecadm+ l5.v2stcritrecadm+ l6.v2stcritrecadm+ l7.v2stcritrecadm+ l8.v2stcritrecadm+ l9.v2stcritrecadm)/10
sort country_id year
summarize v2stcritrecadm meanl10_v2stcritrecadm

by country_id, sort: generate meanl10_v2clrspct =(v2clrspct+ l1.v2clrspct+ l2.v2clrspct+ l3.v2clrspct+ l4.v2clrspct+ l5.v2clrspct+ l6.v2clrspct+ l7.v2clrspct+ l8.v2clrspct+ l9.v2clrspct)/10
sort country_id year
summarize v2clrspct meanl10_v2clrspct

by country_id, sort: generate meanl10_v2excrptps =(v2excrptps+ l1.v2excrptps+ l2.v2excrptps+ l3.v2excrptps+ l4.v2excrptps+ l5.v2excrptps+ l6.v2excrptps+ l7.v2excrptps+ l8.v2excrptps+ l9.v2excrptps)/10
sort country_id year
summarize v2excrptps meanl10_v2excrptps

by country_id, sort: generate meanl10_v2exthftps =(v2exthftps+ l1.v2exthftps+ l2.v2exthftps+ l3.v2exthftps+ l4.v2exthftps+ l5.v2exthftps+ l6.v2exthftps+ l7.v2exthftps+ l8.v2exthftps+ l9.v2exthftps)/10
sort country_id year
summarize v2exthftps meanl10_v2exthftps

by country_id, sort: generate meanl10_v2strenadm =(v2strenadm+ l1.v2strenadm+ l2.v2strenadm+ l3.v2strenadm+ l4.v2strenadm+ l5.v2strenadm+ l6.v2strenadm+ l7.v2strenadm+ l8.v2strenadm+ l9.v2strenadm)/10
sort country_id year
summarize v2strenadm meanl10_v2strenadm

by country_id, sort: generate meanl10_v3struinvadm =(v3struinvadm+ l1.v3struinvadm+ l2.v3struinvadm+ l3.v3struinvadm+ l4.v3struinvadm+ l5.v3struinvadm+ l6.v3struinvadm+ l7.v3struinvadm+ l8.v3struinvadm+ l9.v3struinvadm)/10
sort country_id year
summarize v3struinvadm meanl10_v3struinvadm

browse country_name country_id year v2stcritrecadm meanl10_v2stcritrecadm


***Time dummies, etc for temporal heterogeneity tests
generate time_period = .
replace time_period = 0 if year>1788 & year <1849
replace time_period = 1 if year>1848 & year <1871
replace time_period = 2 if year>1870 & year <1914
replace time_period = 3 if year>1913 & year <1946
replace time_period = 4 if year>1945 & year <1973
replace time_period = 5 if year>1972 & year <2018

generate tp0=.
replace tp0=0 if time_period!=0 & time_period!=.
replace tp0=1 if time_period==0

generate tp1=.
replace tp1=0 if time_period!=1 & time_period!=.
replace tp1=1 if time_period==1

generate tp2=.
replace tp2=0 if time_period!=2 & time_period!=.
replace tp2=1 if time_period==2

generate tp3=.
replace tp3=0 if time_period!=3 & time_period!=.
replace tp3=1 if time_period==3

generate tp4=.
replace tp4=0 if time_period!=4 & time_period!=.
replace tp4=1 if time_period==4

generate tp5=.
replace tp5=0 if time_period!=5 & time_period!=.
replace tp5=1 if time_period==5

summarize time_period tp0 tp1 tp2 tp3 tp4 tp5


generate post45 = tp4+tp5
summarize post45
generate chow_post73_v2clrspct = v2clrspct * tp5
generate chow_post45_v2clrspct = v2clrspct * post45

generate rpost45 =.
replace rpost45 =0 if post45==1
replace rpost45=1 if post45==0

generate rchow_post45_v2clrspct = v2clrspct*rpost45
correlate post45 rpost45 rchow_post45_v2clrspct chow_post45_v2clrspct

generate chow_post73_v2stcritrecadm = v2stcritrecadm * tp5
generate chow_post45_v2stcritrecadm = v2stcritrecadm * post45

generate rchow_post45_v2stcritrecadm = v2stcritrecadm*rpost45
correlate post45 rpost45 rchow_post45_v2stcritrecadm chow_post45_v2stcritrecadm




*******************************************************************
***************** Figures and Tables in the paper *****************
*******************************************************************

****
* Figure 1
****

* Add a scatterplot covering the average of 1970-1990
capture drop _merge
tempfil fil
preserve
  collapse v2clrspct v2stcritrecadm v2x_polyarchy if year>1969 & year<1991,by(country_id)
  rename v2clrspct v2clrspct_1970_90
  rename v2stcritrecadm v2stcritrecadm_1970_90
  rename v2x_polyarchy v2x_polyarchy_1970_90
  sum
  save "`fil'"
restore
merge m:1 country_id using "`fil'"
pwcorr evra_weber v2clrspct_1970_90 /* r=.60 */ v2stcritrecadm_1970_90 /* r=.54 */, obs
*scatter evra_weber v2clrspct_1970_90,mlab(country_name) xtitle("Impartial Public Administration (V-Dem), 1970-1990") ytitle("Weberianism (E & R)")  graphregion(color(white)) bgcolor(white) || lfit evra_weber v2clrspct_1970_90 , legend(off) graphregion(color(white)) bgcolor(white)
twoway (scatter evra_weber v2clrspct_1970_90,mlab(country_name)) (lfit evra_weber v2clrspct_1970_90),  xtitle("Impartial Public Administration (V-Dem), 1970-1990") ytitle("Weberianism (E & R)")  graphregion(color(white)) bgcolor(white) legend(off) scheme(s2color)
drop _merge

*Correlate point estimate government effectiveness

pwcorr e_wbgi_gee v2clrspct /* r=.60 */ v2stcritrecadm /* r=.54 */
correlate e_wbgi_gee v2clrspct
correlate e_wbgi_gee v2stcritrecadm

****
* Figure 2
****
set scheme s1color
xtset country_id year
preserve
  keep if year>=1820 & year<=2004 & (country_name=="United Kingdom" | country_name=="Uruguay")
  sort country_id year
  tsfill
  line v2stcritrecadm year,cmissing(n) || line v2clrspct year,cmissing(n) ||,by(country_name) legend(order(1 "Meritocratic recruitment" 2 "Impartial bureaucracy") rows(2)) /* name(v2clrspct_max_sd_final2, replace) */
**Some manual edits to colors, dashed lines, etc. in Figure 


****
* Figure 3
****
pwcorr QoG_expert_q2_a QoG_expert_q2_b QoG_expert_q2_c QoG_expert_q7 v2stcritrecadmv9 v2clrspctv9

twoway (scatter QoG_expert_q7 v2clrspctv9,mlab(country_name) name(c)) (lfit QoG_expert_q7 v2clrspctv9),  xtitle("Impartial Public Administration (V-Dem), 2014") ytitle("Impartiality (QoG expert-survey), 2014")  graphregion(color(white)) bgcolor(white) legend(off) scheme(s2color)
twoway (scatter QoG_expert_q2_a v2stcritrecadmv9,mlab(country_name) name(d)) (lfit QoG_expert_q2_a v2stcritrecadmv9),  xtitle("Meritocratic recruitment (V-Dem), 2014") ytitle("Meritocratic recruitment (QoG expert-survey), 2014")  graphregion(color(white)) bgcolor(white) legend(off) scheme(s2color)
graph combine c d
  

****
* Figure 4
****

* Testing the "endegenity concern" in terms of negatively correlated meaures of GDP and bureaucratic quality
regr s_mil_loggdp s_democ_unlit_percent v2clrspct
avplot v2clrspct,mlab(country_name) ytitle("GDP/capita (Miller), conditional on %unlit population") xtitle("Impartial Public Administration (V-Dem), conditional on %unlit population") graphregion(color(white)) bgcolor(white) 
regr s_mil_loggdp c.s_democ_unlit_percent##c.v2clrspct


*****
* Table 1
*****

*replicate Evans & Rauch
sort country_id year
*replication
regress L25.twenty_year_growth_rate evra_weber L30.absGDPpc L30.s_bl_25t_yr_sch
estimates store a
*use V-Dem measure for same sample
regress L25.twenty_year_growth_rate v2clrspct L30.absGDPpc L30.s_bl_25t_yr_sch if evra_weber!=.
*avplot v2clrspct,mlab(country_name) (for WB)
estimates store c	
*expand sample 
regress L25.twenty_year_growth_rate v2clrspct L30.absGDPpc L30.s_bl_25t_yr_sch if year==1995
estimates store f	
*now measure at correct time
regress L25.twenty_year_growth_rate L30.v2clrspct L30.absGDPpc L30.s_bl_25t_yr_sch if year==1995
estimates store k	

estout a c f k, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
estout a c f k, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)


*****
* Table 2
*****
sort country_id year
xtset country_id year
regress F5.s_mil_gdp_grow v2clrspct s_mil_loggdp, cluster(country_id)
estimates store c
regress F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year, cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg F5.s_mil_gdp_grow v2stcritrecadm  s_mil_loggdp i.year, fe cluster(country_id)
estimates store h

estout c d e h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)



*****
**Figure 5
*****

xtreg F5.s_mil_gdp_grow v2clrspct  s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2clrspct   s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F5.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp i.year, fe cluster(country_id)
estimates store c
xtreg F5.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow v2clrspct  s_mil_loggdp s_mil_resdep2  i.year, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2clrspct  s_mil_resdep2  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F5.s_mil_gdp_grow v2clrspct   s_mil_loggdp  s_mil_lnpop i.year, fe cluster(country_id)
estimates store g
xtreg F5.gdppcgrowth_F_M v2clrspct  s_far_Maddison_gdppc_1990_estima s_far_Maddison_pop_estimate i.year, fe cluster(country_id)
estimates store h
xtreg F5.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store i
xtreg F5.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store j
estout a b c d e f i j, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)
estout a b c d e f i j, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

coefplot (a, label(Benchmark)) (c, label(+Polyarchy)) (e, label(+Resource dep.)) (g, label(+Population)) (i, label(All controls)), bylabel(Miller GDP)  /// 
|| (b, label(Benchmark)) (d, label(+Polyarchy)) (f, label(+Resource dep.)) (h, label(+Population)) (j, label(All controls)), bylabel(Farris GDP) ///
||, keep(v2clrspct) vertical yline(0)   byopts(colfirst) 

**Some manual edits/changes on rows/columns structure and presentation of the coefficient plot



*****
**Figure 6
*****
*Top, impartial
xtreg F5.s_mil_gdp_grow v2clrspct chow_post45_v2clrspct s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2clrspct chow_post45_v2clrspct  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b

xtreg F5.s_mil_gdp_grow v2clrspct rchow_post45_v2clrspct s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2clrspct rchow_post45_v2clrspct  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f

estout a b e f, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(pre-1945 (Miller GDP))) (e, label(post-1945 (Miller GDP))) (b, label(pre-1945 (Farris GDP))) (f, label(post-1945 (Farris GDP))), bylabel(Benchmark)  /// 
||, keep(v2clrspct) vertical yline(0)   byopts(colfirst) 

*Bottom, meritocratic
xtreg F5.s_mil_gdp_grow v2stcritrecadm chow_post45_v2stcritrecadm s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2stcritrecadm chow_post45_v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b

xtreg F5.s_mil_gdp_grow v2stcritrecadm rchow_post45_v2stcritrecadm s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2stcritrecadm rchow_post45_v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f

estout a b e f, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(pre-1945 (Miller GDP))) (e, label(post-1945 (Miller GDP))) (b, label(pre-1945 (Farris GDP))) (f, label(post-1945 (Farris GDP))), bylabel(Benchmark)  /// 
||, keep(v2stcritrecadm) vertical yline(0)   byopts(colfirst) 




*********************************************
*********************************************
********** Appx Tables & Figures ************
*********************************************
*********************************************

**Appx A

***
*Table A-1
***

pwcorr QoG_expert_q2_a QoG_expert_q2_b QoG_expert_q2_c QoG_expert_q7 v2stcritrecadmv9 v2clrspctv9

***
*Table A-2
***

summarize v2clrspct v2stcritrecadm v2excrptps v2exthftps v2strenadm v3struinvadm v2excrptps v2exthftps s_mil_gdp_grow gdppcgrowth_F_M s_mil_loggdp s_far_Maddison_gdppc_1990_estima  v2x_polyarchy s_mil_lnpop s_far_Maddison_pop_estimate s_mil_resdep2, detail 


**Appx B


***
*Figure A-1
***

twoway (scatter F98.gdppcgrowth_F_M meanl10_v2stcritrecadm if year==1824, mlabel(country_name) mlabsize(medsmall) mlabposition(3) mlabangle(stdarrow)) (lfitci F98.gdppcgrowth_F_M meanl10_v2stcritrecadm if year==1824, clcolor(black) clwidth(medium) clpattern(solid) ciplot(rline) blcolor(black) blwidth(medthin)), ytitle(Annualized GDP per capita growth rate 1824--1913) xtitle(Mean score meritocratic recruitment 1815--1824) legend(off) graphregion(margin(medlarge) fcolor(white) lcolor(white) lwidth(none) ifcolor(white) ilcolor(white) ilwidth(none)) plotregion(margin(medlarge) fcolor(white) lcolor(white) lwidth(none) ifcolor(white) ilcolor(white) ilwidth(none))
*graph save Graph "C:\Users\carlhk_adm\Dropbox\Bureaucracy and growth\Analysis\av8.gph"
twoway (scatter F98.gdppcgrowth_F_M meanl10_v2clrspct if year==1824, mlabel(country_name) mlabsize(medsmall) mlabposition(3) mlabangle(stdarrow)) (lfitci F98.gdppcgrowth_F_M meanl10_v2clrspct if year==1824, clcolor(black) clwidth(medium) clpattern(solid) ciplot(rline) blcolor(black) blwidth(medthin)), ytitle(Annualized GDP per capita growth rate 1824--1913) xtitle(Mean score impartial bureaucracy 1815--1824) legend(off) graphregion(margin(medlarge) fcolor(white) lcolor(white) lwidth(none) ifcolor(white) ilcolor(white) ilwidth(none)) plotregion(margin(medlarge) fcolor(white) lcolor(white) lwidth(none) ifcolor(white) ilcolor(white) ilwidth(none))
*graph save Graph "C:\Users\carlhk_adm\Dropbox\Bureaucracy and growth\Analysis\bv8.gph"
twoway (scatter F98.gdppcgrowth_F_M meanl10_v2strenadm if year==1824, mlabel(country_name) mlabsize(medsmall) mlabposition(6) mlabangle(stdarrow)) (lfitci F98.gdppcgrowth_F_M meanl10_v2strenadm if year==1824, clcolor(black) clwidth(medium) clpattern(solid) ciplot(rline) blcolor(black) blwidth(medthin)), ytitle(Annualized GDP per capita growth rate 1824--1913) xtitle(Mean score officials salaried employees 1815--1824) legend(off) graphregion(margin(medlarge) fcolor(white) lcolor(white) lwidth(none) ifcolor(white) ilcolor(white) ilwidth(none)) plotregion(margin(medlarge) fcolor(white) lcolor(white) lwidth(none) ifcolor(white) ilcolor(white) ilwidth(none))
*graph save Graph "C:\Users\carlhk_adm\Dropbox\Bureaucracy and growth\Analysis\cv8.gph"
twoway (scatter F98.gdppcgrowth_F_M meanl10_v3struinvadm if year==1824, mlabel(country_name) mlabsize(medsmall) mlabposition(6) mlabangle(stdarrow)) (lfitci F98.gdppcgrowth_F_M meanl10_v3struinvadm if year==1824, clcolor(black) clwidth(medium) clpattern(solid) ciplot(rline) blcolor(black) blwidth(medthin)), ytitle(Annualized GDP per capita growth rate 1824--1913) xtitle(Mean score political elites intervene admin. 1815--1824) legend(off) graphregion(margin(medlarge) fcolor(white) lcolor(white) lwidth(none) ifcolor(white) ilcolor(white) ilwidth(none)) plotregion(margin(medlarge) fcolor(white) lcolor(white) lwidth(none) ifcolor(white) ilcolor(white) ilwidth(none))
*graph save Graph "C:\Users\carlhk_adm\Dropbox\Bureaucracy and growth\Analysis\dv8.gph"

*graph combine "C:\Users\carlhk_adm\Dropbox\Bureaucracy and growth\Analysis\bv8.gph" "C:\Users\carlhk_adm\Dropbox\Bureaucracy and growth\Analysis\av8.gph" "C:\Users\carlhk_adm\Dropbox\Bureaucracy and growth\Analysis\dv8.gph" "C:\Users\carlhk_adm\Dropbox\Bureaucracy and growth\Analysis\cv8.gph", imargin(small) graphregion(margin(small) fcolor(white) lcolor(white) lwidth(none) ifcolor(white) ilcolor(white) ilwidth(none)) plotregion(margin(medsmall) fcolor(white) lcolor(white) lwidth(none) ifcolor(white) ilcolor(white) ilwidth(none))
*graph save Graph "C:\Users\carlhk_adm\Dropbox\Bureaucracy and growth\Analysis\combov8.gph"




***
*Table A-3
***

*Combine four tables from below
regress F125.gdppcgrowth_F_M_125  s_far_Maddison_gdppc_1990_estima v2clrspct if year==1789
estimates store a
regress F115.gdppcgrowth_F_M_115  s_far_Maddison_gdppc_1990_estima meanl10_v2clrspct if year==1798
estimates store b
regress F98.gdppcgrowth_F_M_98  s_far_Maddison_gdppc_1990_estima v2clrspct if year==1815
estimates store c
regress F89.gdppcgrowth_F_M_89  s_far_Maddison_gdppc_1990_estima meanl10_v2clrspct if year==1824
estimates store d
estout a b c d , cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

regress F125.gdppcgrowth_F_M_125 s_far_Maddison_gdppc_1990_estima v2stcritrecadm if year==1789
estimates store e
regress F115.gdppcgrowth_F_M_115 s_far_Maddison_gdppc_1990_estima meanl10_v2stcritrecadm if year==1798
estimates store f
regress F98.gdppcgrowth_F_M_98 s_far_Maddison_gdppc_1990_estima v2stcritrecadm if year==1815
estimates store g
regress F89.gdppcgrowth_F_M_89 s_far_Maddison_gdppc_1990_estima meanl10_v2stcritrecadm if year==1824
estimates store h
estout e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

regress F125.gdppcgrowth_F_M_125  s_far_Maddison_gdppc_1990_estima v3struinvadm if year==1789
estimates store a
regress F115.gdppcgrowth_F_M_115  s_far_Maddison_gdppc_1990_estima meanl10_v3struinvadm if year==1798
estimates store b
regress F98.gdppcgrowth_F_M_98  s_far_Maddison_gdppc_1990_estima v3struinvadm if year==1815
estimates store c
regress F89.gdppcgrowth_F_M_89  s_far_Maddison_gdppc_1990_estima meanl10_v3struinvadm if year==1824
estimates store d
estout a b c d , cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

regress F125.gdppcgrowth_F_M_125  s_far_Maddison_gdppc_1990_estima v2strenadm  if year==1789
estimates store a
regress F115.gdppcgrowth_F_M_115  s_far_Maddison_gdppc_1990_estima meanl10_v2strenadm  if year==1798
estimates store b
regress F98.gdppcgrowth_F_M_98  s_far_Maddison_gdppc_1990_estima v2strenadm  if year==1815
estimates store c
regress F89.gdppcgrowth_F_M_89  s_far_Maddison_gdppc_1990_estima meanl10_v2strenadm  if year==1824
estimates store d
estout a b c d , cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)


**Appx C

***
*Table A-4
***

xtreg F5.s_mil_gdp_grow v2clrspct  s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2clrspct   s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F5.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp i.year, fe cluster(country_id)
estimates store c
xtreg F5.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow v2clrspct  s_mil_loggdp s_mil_resdep2  i.year, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2clrspct  s_mil_resdep2  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F5.s_mil_gdp_grow v2clrspct   s_mil_loggdp  s_mil_lnpop i.year, fe cluster(country_id)
estimates store g
xtreg F5.gdppcgrowth_F_M v2clrspct  s_far_Maddison_gdppc_1990_estima s_far_Maddison_pop_estimate i.year, fe cluster(country_id)
estimates store h
xtreg F5.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store i
xtreg F5.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store j
estout a b c d e f i j, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)
estout a b c d e f i j, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

*****
* Table A-5 
*****

*replicate Evans & Rauch
sort country_id year
*replication
regress L25.twenty_year_growth_rate evra_weber L30.absGDPpc L30.s_bl_25t_yr_sch
estimates store a
*use V-Dem measure for same sample
regress L25.twenty_year_growth_rate v2stcritrecadmv9 L30.absGDPpc L30.s_bl_25t_yr_sch if evra_weber!=.
*avplot v2clrspct,mlab(country_name) (for WB)
estimates store c	
regress L25.twenty_year_growth_rate evra_weber L30.absGDPpc L30.s_bl_25t_yr_sch if _est_c==1
estimates store a
*use V-Dem measure for same sample
regress L25.twenty_year_growth_rate v2stcritrecadmv9 L30.absGDPpc L30.s_bl_25t_yr_sch if evra_weber!=. & _est_a ==1
*avplot v2clrspct,mlab(country_name) (for WB)
estimates store c	
*expand sample 
regress L25.twenty_year_growth_rate v2stcritrecadmv9 L30.absGDPpc L30.s_bl_25t_yr_sch if year==1995
estimates store f	
*now measure at correct time
regress L25.twenty_year_growth_rate L30.v2stcritrecadmv9 L30.absGDPpc L30.s_bl_25t_yr_sch if year==1995
estimates store k	
estout a c f k, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
estout a c f k, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

*****
* Table A-6 
*****
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if year<1921, fe cluster(country_id)
estimates store a
xtreg F5.s_mil_gdp_grow v2stcritrecadm s_mil_loggdp i.year if _est_a==1 & year<1921, fe cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow v2strenadm s_mil_loggdp i.year if _est_d==1 & year<1921, fe cluster(country_id)
estimates store e
xtreg F5.s_mil_gdp_grow v3struinvadm s_mil_loggdp i.year if _est_e==1 & year<1921, fe cluster(country_id)
estimates store f
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if _est_f==1 & year<1921, fe cluster(country_id)
estimates store a
xtreg F5.s_mil_gdp_grow v2stcritrecadm s_mil_loggdp i.year if _est_a==1 & year<1921, fe cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow v2strenadm s_mil_loggdp i.year if _est_d==1 & year<1921, fe cluster(country_id)
estimates store e
xtreg F5.s_mil_gdp_grow v3struinvadm s_mil_loggdp i.year if _est_e==1 & year<1921, fe cluster(country_id)
estimates store f
estout a d e f, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

*****
* Table A-7 
*****
summarize v2strenadm v3struinvadm  v2clrspct v2stcritrecadm

*     Variable |        Obs        Mean    Std. Dev.       Min        Max
*-------------+---------------------------------------------------------
 * v2strenadm |      8,422    .0715958    1.428637   -3.23889   1.622079
*v3struinvadm |      8,359    .0787415    1.381096   -2.25238   2.454648
*   v2clrspct |     25,255   -.0332073    1.447674   -3.63137   4.622568
*v2stcritre~m |     14,562   -.0418873    1.336849  -2.685966   3.373873

generate nv3strenadm = (v2strenadm+3.23890)/(1.622079+ 3.23890)
generate nv3struinvadm = (v3struinvadm +2.25239)/(2.454648 + 2.25239)
generate nv2clrspct = (v2clrspct +3.63138)/( 4.622568+ 3.63138)
generate nv3stcritrecadm = (v2stcritrecadm+2.685967)/(3.373873 + 2.685967)

summarize nv2clrspct nv3stcritrecadm nv3strenadm nv3struinvadm
generate multiplicativeWB = nv2clrspct *nv3stcritrecadm *nv3strenadm *nv3struinvadm
generate additiveWB = (nv2clrspct +nv3stcritrecadm +nv3strenadm +nv3struinvadm)/4

factor nv2clrspct nv3stcritrecadm nv3strenadm nv3struinvadm

pca nv2clrspct nv3stcritrecadm nv3strenadm nv3struinvadm, components(1)
predict WBprinccomp, score

xtreg F5.s_mil_gdp_grow additiveWB s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M additiveWB s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F5.s_mil_gdp_grow multiplicativeWB s_mil_loggdp i.year, fe cluster(country_id)
estimates store c
xtreg F5.gdppcgrowth_F_M multiplicativeWB s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow WBprinccomp s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M WBprinccomp s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
estout a b c d e f, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_far_Maddison_gdppc_1990_estima Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)


**Appx E

*****
* Figure A-2 
*****

**Testing change in light v2stcritrecadm
xtreg F5.s_hen_pctlit v2clrspct s_hen_pctlit i.year, fe cluster(country_id)
estimates store a
xtreg F5.s_hen_pctlit v2stcritrecadm s_hen_pctlit i.year, fe cluster(country_id)
estimates store b
estout a b , cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
coefplot (a) (b), keep(v2clrspct v2stcritrecadm) vertical yline(0) 


**Appx F on five year panels is placed at the very end of this do file


**Appx G

*****
* Table A-13 
*****

xtreg F5.s_mil_gdp_grow v2stcritrecadm  s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2stcritrecadm   s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F5.s_mil_gdp_grow v2stcritrecadm  v2x_polyarchy s_mil_loggdp i.year, fe cluster(country_id)
estimates store c
xtreg F5.gdppcgrowth_F_M v2stcritrecadm v2x_polyarchy s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow v2stcritrecadm s_mil_loggdp s_mil_resdep2  i.year, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2stcritrecadm  s_mil_resdep2  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F5.s_mil_gdp_grow v2stcritrecadm   s_mil_loggdp  s_mil_lnpop i.year, fe cluster(country_id)
estimates store g
xtreg F5.gdppcgrowth_F_M v2stcritrecadm  s_far_Maddison_gdppc_1990_estima s_far_Maddison_pop_estimate i.year, fe cluster(country_id)
estimates store h
xtreg F5.s_mil_gdp_grow v2stcritrecadm  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store i
xtreg F5.gdppcgrowth_F_M v2stcritrecadm  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store j
estout a b c d e f i j, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)
estout a b c d e f i j, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)



*****
* Figure A-3 
*****

xtreg L25.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
xtreg L10.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg L5.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store c
xtreg L3.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store d
xtreg L1.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store e
xtreg gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F1.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store g
xtreg F3.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store h
xtreg F5.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store i
xtreg F10.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store j
xtreg F25.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store k
estout a b c d e f g h i j k, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_far_Maddison_gdppc_1990_estima Ln_GDP_pc v2stcritrecadm Impartial_public_admin L30.absGDPpc_F_M GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(t-25)) (b, label(t-10)) (c, label(t-5)) (d, label(t-3)) (e, label(t-1)) (f, label(t=0)) (g, label(t+1)) (h, label(t+3)) (i, label(t+5)) (j, label(t+10)) (k, label(t+25)), bylabel(Growth measured t years after) keep(v2stcritrecadm) vertical yline(0) 



**Tables A-14 and A-15 are placed at the bottom of this do file together with the other tests on 5-year panels from Appx F


**Appx H


*****
* Figure A-4 
*****
xtreg F5.s_mil_gdp_grow v2clrspct  s_mil_loggdp i.year, fe cluster(country_id)
estimates store a1
xtreg F5.gdppcgrowth_F_M v2clrspct   s_far_Maddison_gdppc_1990_estima i.year if _est_a1==1, fe cluster(country_id)
estimates store b1

xtreg F5.s_mil_gdp_grow v2clrspct  s_mil_loggdp i.year if _est_b1==1, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2clrspct   s_far_Maddison_gdppc_1990_estima i.year if _est_a==1, fe cluster(country_id)
estimates store b


xtreg F5.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp i.year, fe cluster(country_id)
estimates store c1
xtreg F5.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_gdppc_1990_estima i.year if _est_c1==1, fe cluster(country_id)
estimates store d1

xtreg F5.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp i.year if _est_d1==1, fe cluster(country_id)
estimates store c
xtreg F5.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_gdppc_1990_estima i.year if _est_c==1, fe cluster(country_id)
estimates store d

xtreg F5.s_mil_gdp_grow v2clrspct  s_mil_loggdp s_mil_resdep2  i.year, fe cluster(country_id)
estimates store e1
xtreg F5.gdppcgrowth_F_M v2clrspct  s_mil_resdep2  s_far_Maddison_gdppc_1990_estima i.year if _est_e1==1, fe cluster(country_id)
estimates store f1

xtreg F5.s_mil_gdp_grow v2clrspct  s_mil_loggdp s_mil_resdep2  i.year if _est_f1==1, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2clrspct  s_mil_resdep2  s_far_Maddison_gdppc_1990_estima i.year if _est_e==1, fe cluster(country_id)
estimates store f

xtreg F5.s_mil_gdp_grow v2clrspct   s_mil_loggdp  s_mil_lnpop i.year, fe cluster(country_id)
estimates store g1
xtreg F5.gdppcgrowth_F_M v2clrspct  s_far_Maddison_gdppc_1990_estima s_far_Maddison_pop_estimate i.year if _est_g1==1, fe cluster(country_id)
estimates store h1

xtreg F5.s_mil_gdp_grow v2clrspct   s_mil_loggdp  s_mil_lnpop i.year if _est_h1==1, fe cluster(country_id)
estimates store g
xtreg F5.gdppcgrowth_F_M v2clrspct  s_far_Maddison_gdppc_1990_estima s_far_Maddison_pop_estimate i.year if _est_g==1, fe cluster(country_id)
estimates store h


xtreg F5.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store i1
xtreg F5.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year if _est_i1==1, fe cluster(country_id)
estimates store j1


xtreg F5.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year if _est_j1==1, fe cluster(country_id)
estimates store i
xtreg F5.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year if _est_i==1, fe cluster(country_id)
estimates store j
estout a b c d e f i j, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* ) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)
estout a b c d e f i j, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* ) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

coefplot (a, label(Benchmark)) (c, label(+Polyarchy)) (e, label(+Resource dep.)) (g, label(+Population)) (i, label(All controls)), bylabel(Miller GDP)  /// 
|| (b, label(Benchmark)) (d, label(+Polyarchy)) (f, label(+Resource dep.)) (h, label(+Population)) (j, label(All controls)), bylabel(Farris GDP) ///
||, keep(v2clrspct) vertical yline(0)   byopts(colfirst) 


*****
* Figure A-5 
*****

xtreg F5.s_mil_gdp_grow v2clrspct chow_post45_v2clrspct s_mil_loggdp i.year, fe cluster(country_id)
estimates store a1
xtreg F5.gdppcgrowth_F_M v2clrspct chow_post45_v2clrspct  s_far_Maddison_gdppc_1990_estima i.year if _est_a1==1, fe cluster(country_id)
estimates store b1

xtreg F5.s_mil_gdp_grow v2clrspct chow_post45_v2clrspct s_mil_loggdp i.year if _est_b1==1, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2clrspct chow_post45_v2clrspct  s_far_Maddison_gdppc_1990_estima i.year if _est_a==1, fe cluster(country_id)
estimates store b

xtreg F5.s_mil_gdp_grow v2clrspct rchow_post45_v2clrspct s_mil_loggdp i.year , fe cluster(country_id)
estimates store e1
xtreg F5.gdppcgrowth_F_M v2clrspct rchow_post45_v2clrspct  s_far_Maddison_gdppc_1990_estima i.year if _est_e1==1, fe cluster(country_id)
estimates store f1

xtreg F5.s_mil_gdp_grow v2clrspct rchow_post45_v2clrspct s_mil_loggdp i.year if _est_f1==1, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2clrspct rchow_post45_v2clrspct  s_far_Maddison_gdppc_1990_estima i.year if _est_e==1, fe cluster(country_id)
estimates store f

estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(pre-1945 (Miller GDP))) (e, label(post-1945 (Miller GDP))) (b, label(pre-1945 (Farris GDP))) (f, label(post-1945 (Farris GDP))), bylabel(Benchmark)  /// 
||, keep(v2clrspct) vertical yline(0)   byopts(colfirst) 



xtreg F5.s_mil_gdp_grow v2stcritrecadm chow_post45_v2stcritrecadm s_mil_loggdp i.year, fe cluster(country_id)
estimates store a1
xtreg F5.gdppcgrowth_F_M v2stcritrecadm chow_post45_v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year if _est_a1==1, fe cluster(country_id)
estimates store b1

xtreg F5.s_mil_gdp_grow v2stcritrecadm chow_post45_v2stcritrecadm s_mil_loggdp i.year if _est_b1==1, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2stcritrecadm chow_post45_v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year if _est_a==1, fe cluster(country_id)
estimates store b

xtreg F5.s_mil_gdp_grow v2stcritrecadm rchow_post45_v2stcritrecadm s_mil_loggdp i.year , fe cluster(country_id)
estimates store e1
xtreg F5.gdppcgrowth_F_M v2stcritrecadm rchow_post45_v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year if _est_e1==1, fe cluster(country_id)
estimates store f1

xtreg F5.s_mil_gdp_grow v2stcritrecadm rchow_post45_v2stcritrecadm s_mil_loggdp i.year if _est_f1==1, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2stcritrecadm rchow_post45_v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year if _est_e==1, fe cluster(country_id)
estimates store f

estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(pre-1945 (Miller GDP))) (e, label(post-1945 (Miller GDP))) (b, label(pre-1945 (Farris GDP))) (f, label(post-1945 (Farris GDP))), bylabel(Benchmark)  /// 
||, keep(v2stcritrecadm) vertical yline(0)   byopts(colfirst) 


** Appx I

*****
* Figure A-6 
*****


xtreg L25.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
xtreg L10.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg L5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store c
xtreg L3.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store d
xtreg L1.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store e
xtreg gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F1.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store g
xtreg F3.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store h
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store i
xtreg F10.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store j
xtreg F25.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store k
estout a b c d e f g h i j k, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_far_Maddison_gdppc_1990_estima Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc_F_M GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(t-25)) (b, label(t-10)) (c, label(t-5)) (d, label(t-3)) (e, label(t-1)) (f, label(t=0)) (g, label(t+1)) (h, label(t+3)) (i, label(t+5)) (j, label(t+10)) (k, label(t+25)), bylabel(Growth measured t years after) keep(v2clrspct) vertical yline(0) 

*****
* Figure A-7 
*****

xtreg L25.s_mil_gdp_grow v2stcritrecadm   s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg L10.s_mil_gdp_grow v2stcritrecadm   s_mil_loggdp i.year, fe cluster(country_id)
estimates store b
xtreg L5.s_mil_gdp_grow v2stcritrecadm   s_mil_loggdp i.year, fe cluster(country_id)
estimates store c
xtreg L3.s_mil_gdp_grow v2stcritrecadm   s_mil_loggdp i.year, fe cluster(country_id)
estimates store d
xtreg L1.s_mil_gdp_grow v2stcritrecadm   s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg s_mil_gdp_grow v2stcritrecadm   s_mil_loggdp i.year, fe cluster(country_id)
estimates store f
xtreg F1.s_mil_gdp_grow v2stcritrecadm   s_mil_loggdp i.year, fe cluster(country_id)
estimates store g
xtreg F3.s_mil_gdp_grow v2stcritrecadm  s_mil_loggdp i.year, fe cluster(country_id)
estimates store h
xtreg F5.s_mil_gdp_grow v2stcritrecadm   s_mil_loggdp i.year, fe cluster(country_id)
estimates store i
xtreg F10.s_mil_gdp_grow v2stcritrecadm   s_mil_loggdp i.year, fe cluster(country_id)
estimates store j
xtreg F25.s_mil_gdp_grow v2stcritrecadm  s_mil_loggdp i.year, fe cluster(country_id)
estimates store k
estout a b c d e f g h i j k, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_far_Maddison_gdppc_1990_estima Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc_F_M GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(t-25)) (b, label(t-10)) (c, label(t-5)) (d, label(t-3)) (e, label(t-1)) (f, label(t=0)) (g, label(t+1)) (h, label(t+3)) (i, label(t+5)) (j, label(t+10)) (k, label(t+25)), bylabel(Growth measured t years after) keep(v2clrspct) vertical yline(0) 




** Appx J

*****
* Figure A-8 
*****


generate western=0
replace western = 1 if country_id== 5 | country_id==6 | country_id== 20 |  country_id==21 |  country_id==66 |  country_id==67 |  country_id== 76|  country_id== 77|  country_id==81 |  country_id==82 |  country_id==91 |  country_id==96 |  country_id== 101|  country_id==144 |  country_id==148 |  country_id== 158|  country_id==163 |  country_id==164 |  country_id==168 |  country_id== 174|  country_id==185 |  country_id== 186|  country_id>349

xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if evra_sample==1, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if evra_sample==1, fe cluster(country_id)
estimates store b
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if evra_sample==0, fe cluster(country_id)
estimates store c
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if evra_sample==0, fe cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if western==1, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if western==1, fe cluster(country_id)
estimates store f
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if western==0, fe cluster(country_id)
estimates store g
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if western==0, fe cluster(country_id)
estimates store h
estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
estout e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
coefplot (e, label(Western countries)) (g, label(Non-western countries)), bylabel(Miller GDP)  /// 
|| (f, label(Western countries)) (h, label(Non-western countries)), bylabel(Farris GDP) ///
||, keep(v2clrspct) vertical yline(0)   byopts(colfirst) 



*****
* Figure A-9 
*****

xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if western==1, fe cluster(country_id)
estimates store e1
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if western==1 & _est_e1==1, fe cluster(country_id)
estimates store f1

xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if western==1 & _est_f1==1, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if western==1 & _est_e==1, fe cluster(country_id)
estimates store f

xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if western==0, fe cluster(country_id)
estimates store g1
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if western==0 & _est_g1==1, fe cluster(country_id)
estimates store h1

xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if western==0 & _est_h1==1, fe cluster(country_id)
estimates store g
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if western==0 & _est_h==1, fe cluster(country_id)
estimates store h

estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
estout e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
coefplot (e, label(Western countries)) (g, label(Non-western countries)), bylabel(Miller GDP)  /// 
|| (f, label(Western countries)) (h, label(Non-western countries)), bylabel(Fariss GDP) ///
||, keep(v2clrspct) vertical yline(0)   byopts(colfirst) 

*****
* Figure A-10 
*****

xtreg F5.s_mil_gdp_grow c.v2clrspct c.s_mil_loggdp c.v2clrspct#c.s_mil_loggdp i.year, fe cluster(country_id)
estimates store www
qui margins, dydx(v2clrspct) at(s_mil_loggdp = (5(0.5)11))
marginsplot, recast(line) plotopts(lwidth(medthick)) recastci(rline) ciopts(lwidth(vthin) lpattern(longdash)) level(95) xlabel(5(1)11) name(restt)

*****
* Figure A-11 
*****

xtreg F5.gdppcgrowth_F_M c.v2clrspct c.s_far_Maddison_gdppc_1990_estima c.v2clrspct#c.s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store ww
qui margins, dydx(v2clrspct) at(s_far_Maddison_gdppc_1990_estima = (5(0.5)11))
marginsplot, recast(line) plotopts(lwidth(medthick)) recastci(rline) ciopts(lwidth(vthin) lpattern(longdash)) level(95) xlabel(5(1)11) name(rest)



**
* Appx Table A-16
** 

by year, sort: egen frontierGDPPC_FM = max(s_far_Maddison_gdppc_1990_estima)
by year, sort: egen frontierGDPPC_MI = max(s_mil_loggdp)
browse country_id year frontierGDPPC_FM frontierGDPPC_MI s_far_Maddison_gdppc_1990_estima s_mil_loggdp
sort country_id year
generate dist_frontierGDPPC_FM = frontierGDPPC_FM  - s_far_Maddison_gdppc_1990_estima
generate dist_frontierGDPPC_MI = frontierGDPPC_MI  - s_mil_loggdp
browse country_id country_name year dist_frontierGDPPC_FM dist_frontierGDPPC_MI s_far_Maddison_gdppc_1990_estima s_mil_loggdp

generate impburdistFM = dist_frontierGDPPC_FM*nv2clrspct 
generate impburdistMI= dist_frontierGDPPC_MI*nv2clrspct
generate merburdistFM = dist_frontierGDPPC_FM*nv3stcritrecadm 
generate merburdistMI = dist_frontierGDPPC_MI*nv3stcritrecadm

sort country_id year
xtreg F5.s_mil_loggdp impburdistMI dist_frontierGDPPC_MI nv2clrspct s_mil_loggdp, fe cluster(country_id)
estimates store a
xtreg F5.s_far_Maddison_gdppc_1990_estima impburdistFM dist_frontierGDPPC_FM nv2clrspct s_far_Maddison_gdppc_1990_estima, fe cluster(country_id)
estimates store b
xtreg F5.s_mil_loggdp merburdistMI dist_frontierGDPPC_MI nv3stcritrecadm s_mil_loggdp, fe cluster(country_id)
estimates store c
xtreg F5.s_far_Maddison_gdppc_1990_estima merburdistFM dist_frontierGDPPC_FM nv3stcritrecadm s_far_Maddison_gdppc_1990_estima, fe cluster(country_id)
estimates store d
estout a b c d, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

*****
* Figure A-12 
*****

xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if tp0==1, fe cluster(country_id)
estimates store a
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if tp1==1, fe cluster(country_id)
estimates store b
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if tp2==1, fe cluster(country_id)
estimates store c
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if tp3==1, fe cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if tp4==1, fe cluster(country_id)
estimates store e
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if tp5==1, fe cluster(country_id)
estimates store f
estout a b c d e f, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if tp0==1, fe cluster(country_id)
estimates store aa
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if tp1==1, fe cluster(country_id)
estimates store ba
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if tp2==1, fe cluster(country_id)
estimates store ca
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if tp3==1, fe cluster(country_id)
estimates store da
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if tp4==1, fe cluster(country_id)
estimates store ea
xtreg F5.gdppcgrowth_F_M v2clrspct s_far_Maddison_gdppc_1990_estima i.year if tp5==1, fe cluster(country_id)
estimates store fa
estout a b c d e f, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(1789-1848)) (b, label(1849-1870)) (c, label(1871-1913)) (d, label(1913-1945)) (e, label(1946-1972)) (f, label(1973-)), bylabel(Miller GDP)  /// 
|| (aa, label(1789-1848)) (ba, label(1849-1870)) (ca, label(1871-1913)) (da, label(1913-1945)) (ea, label(1946-1972)) (fa, label(1973-)), bylabel(Farris GDP) ///
||, keep(v2clrspct) vertical yline(0)   byopts(colfirst) 


*****
* Figure A-13 
*****

xtreg F5.s_mil_gdp_grow v2stcritrecadm s_mil_loggdp i.year if tp0==1, fe cluster(country_id)
estimates store a
xtreg F5.s_mil_gdp_grow v2stcritrecadm s_mil_loggdp i.year if tp1==1, fe cluster(country_id)
estimates store b
xtreg F5.s_mil_gdp_grow v2stcritrecadm s_mil_loggdp i.year if tp2==1, fe cluster(country_id)
estimates store c
xtreg F5.s_mil_gdp_grow v2stcritrecadm s_mil_loggdp i.year if tp3==1, fe cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow v2stcritrecadm s_mil_loggdp i.year if tp4==1, fe cluster(country_id)
estimates store e
xtreg F5.s_mil_gdp_grow v2stcritrecadm s_mil_loggdp i.year if tp5==1, fe cluster(country_id)
estimates store f
estout a b c d e f, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

xtreg F5.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year if tp0==1, fe cluster(country_id)
estimates store aa
xtreg F5.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year if tp1==1, fe cluster(country_id)
estimates store ba
xtreg F5.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year if tp2==1, fe cluster(country_id)
estimates store ca
xtreg F5.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year if tp3==1, fe cluster(country_id)
estimates store da
xtreg F5.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year if tp4==1, fe cluster(country_id)
estimates store ea
xtreg F5.gdppcgrowth_F_M v2stcritrecadm s_far_Maddison_gdppc_1990_estima i.year if tp5==1, fe cluster(country_id)
estimates store fa
estout a b c d e f, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(1789-1848)) (b, label(1849-1870)) (c, label(1871-1913)) (d, label(1913-1945)) (e, label(1945-1972)) (f, label(1973-)), bylabel(Miller GDP)  /// 
|| (aa, label(1789-1848)) (ba, label(1849-1870)) (ca, label(1871-1913)) (da, label(1913-1945)) (ea, label(1945-1972)) (fa, label(1973-)), bylabel(Farris GDP) ///
||, keep(v2stcritrecadm) vertical yline(0)   byopts(colfirst) 


**Appx K

**
* Appx Table A-17
** 


regress F5.s_mil_gdp_grow v2clrspct s_mil_loggdp if v2svindepv9==1, cluster(country_id)
estimates store c
regress F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if v2svindepv9==1, cluster(country_id)
estimates store d
xtreg F5.s_mil_gdp_grow v2clrspct s_mil_loggdp i.year if v2svindepv9==1, fe cluster(country_id)
estimates store e
xtreg F5.s_mil_gdp_grow v2stcritrecadm  s_mil_loggdp i.year if v2svindepv9==1, fe cluster(country_id)
estimates store h

estout c d e h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

*****
* Figure A-13 
*****

**TOP
xtreg F5.s_mil_gdp_grow v2clrspct chow_post45_v2clrspct s_mil_loggdp i.year if v2svindepv9==1, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2clrspct chow_post45_v2clrspct  s_far_Maddison_gdppc_1990_estima i.year if v2svindepv9==1, fe cluster(country_id)
estimates store b


xtreg F5.s_mil_gdp_grow v2clrspct rchow_post45_v2clrspct s_mil_loggdp i.year if v2svindepv9==1, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2clrspct rchow_post45_v2clrspct  s_far_Maddison_gdppc_1990_estima i.year if v2svindepv9==1, fe cluster(country_id)
estimates store f

estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(pre-1945 (Miller GDP))) (e, label(post-1945 (Miller GDP))) (b, label(pre-1945 (Farris GDP))) (f, label(post-1945 (Farris GDP))), bylabel(Benchmark)  /// 
||, keep(v2clrspct) vertical yline(0)   byopts(colfirst) 


**Bottom
xtreg F5.s_mil_gdp_grow v2stcritrecadm chow_post45_v2stcritrecadm s_mil_loggdp i.year if v2svindepv9==1, fe cluster(country_id)
estimates store a
xtreg F5.gdppcgrowth_F_M v2stcritrecadm chow_post45_v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year if v2svindepv9==1, fe cluster(country_id)
estimates store b

xtreg F5.s_mil_gdp_grow v2stcritrecadm rchow_post45_v2stcritrecadm s_mil_loggdp i.year if v2svindepv9==1, fe cluster(country_id)
estimates store e
xtreg F5.gdppcgrowth_F_M v2stcritrecadm rchow_post45_v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year if v2svindepv9==1, fe cluster(country_id)
estimates store f

estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)

coefplot (a, label(pre-1945 (Miller GDP))) (e, label(post-1945 (Miller GDP))) (b, label(pre-1945 (Farris GDP))) (f, label(post-1945 (Farris GDP))), bylabel(Benchmark)  /// 
||, keep(v2stcritrecadm) vertical yline(0)   byopts(colfirst) 



save "C:\Users\carlhk\Dropbox\Bureaucracy and growth\Analysis\Replication_data_CPS\Replication_data_Bureaucracy_Growth.dta", replace

***
*FIVE YEAR PANEL REDUCTION
***

**Please note that for these results, there are some minor deviations in coefficients and number of observations from that reported in the online appendix, but nothing of substantial interests. This is likely due to slightly different versions/updates on some variables from the version on which these tableswere originally created.

****Create 5 year dataset
drop if year != 2015 & year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 & year != 1895 & year != 1890 & year != 1885 & year != 1880 & year != 1875 & year != 1870 & year != 1865 & year != 1860 & year != 1855 & year != 1850 & year != 1845 & year != 1840 & year != 1835 & year != 1830 & year != 1825 & year != 1820 & year != 1815 & year != 1810 & year != 1805 & year != 1800 & year != 1795 & year != 1790 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend
fvset base 1790 trend
*save "C:\Users\carlhk_adm\Dropbox\Bureaucracy and growth\Analysis\publicv8_ribbed_with_S_data_5yr_panel.dta"


**Appx F

***
*Table A-8 
***

xtreg F.s_mil_gdp_grow v2clrspct  s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F.gdppcgrowth_F_M v2clrspct  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store c
xtreg F.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store d
*equivalent specifications, with Ln GDP pc as DV
xtreg F.s_mil_loggdp v2clrspct  s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg F.s_far_Maddison_gdppc_1990_estima v2clrspct  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F.s_mil_loggdp v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store g
xtreg F.s_far_Maddison_gdppc_1990_estima v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store h
estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (fixed)
estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)



***
*Table A-8 
***

xtreg F.s_mil_gdp_grow v2clrspct  s_mil_loggdp v2clrspct L. s_mil_gdp_grow v2clrspct L2.s_mil_gdp_grow  i.year, fe cluster(country_id)
estimates store a
xtreg F.gdppcgrowth_F_M v2clrspct  s_far_Maddison_gdppc_1990_estima L.gdppcgrowth_F_M L2.gdppcgrowth_F_M i.year, fe cluster(country_id)
estimates store b
xtreg F.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 L. s_mil_gdp_grow v2clrspct L2.s_mil_gdp_grow  i.year, fe cluster(country_id)
estimates store c
xtreg F.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima  L.gdppcgrowth_F_M L2.gdppcgrowth_F_M s_mil_resdep2 i.year, fe cluster(country_id)
estimates store d
*equivalent specifications, with Ln GDP pc as DV
xtreg F.s_mil_loggdp v2clrspct  s_mil_loggdp L.s_mil_loggdp L2.s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg F.s_far_Maddison_gdppc_1990_estima v2clrspct  s_far_Maddison_gdppc_1990_estima L.s_far_Maddison_gdppc_1990_estima L2.s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F.s_mil_loggdp v2clrspct  v2x_polyarchy s_mil_loggdp L.s_mil_loggdp L2.s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store g
xtreg F.s_far_Maddison_gdppc_1990_estima v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima L.s_far_Maddison_gdppc_1990_estima L2.s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store h
estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)


***
*Table A-10 
***

xi: xtabond2 F.s_mil_gdp_grow v2clrspct s_mil_gdp_grow s_mil_loggdp i.year, gmm(v2clrspct, lag (2 3)) robust artests(2)
estimates store a
xi: xtabond2 F.gdppcgrowth_F_M v2clrspct gdppcgrowth_F_M  s_far_Maddison_gdppc_1990_estima i.year, gmm(v2clrspct, lag (2 3))  robust artests(2)
estimates store b
xi: xtabond2 F.s_mil_gdp_grow v2clrspct s_mil_gdp_grow v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, gmm(v2clrspct, lag (2 3))  robust artests(2)
estimates store c
xi: xtabond2 F.gdppcgrowth_F_M v2clrspct gdppcgrowth_F_M v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, gmm(v2clrspct, lag (2 3))  robust artests(2)
estimates store d
*equivalent specifications, with Ln GDP pc as DV
xi: xtabond2 F.s_mil_loggdp s_mil_loggdp v2clrspct  s_mil_loggdp i.year, gmm(v2clrspct, lag (2 3)) robust artests(2)
estimates store e
xi: xtabond2 F.s_far_Maddison_gdppc_1990_estima s_far_Maddison_gdppc_1990_estima v2clrspct  s_far_Maddison_gdppc_1990_estima i.year, gmm(v2clrspct, lag (2 3))  robust artests(2)
estimates store f
xi: xtabond2 F.s_mil_loggdp s_mil_loggdp  v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, gmm(v2clrspct, lag (2 3)) robust artests(2)
estimates store g
xi: xtabond2 F.s_far_Maddison_gdppc_1990_estima s_far_Maddison_gdppc_1990_estima v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, gmm(v2clrspct, lag (2 3))  robust artests(2)
estimates store h
estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons _I*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

***
*Table A-11 
***

** Forward-lagging so that DV is measure in year t+10
xtreg F2.s_mil_gdp_grow v2clrspct  s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F2.gdppcgrowth_F_M v2clrspct  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F2.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store c
xtreg F2.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store d
*equivalent specifications, with Ln GDP pc as DV
xtreg F2.s_mil_loggdp v2clrspct  s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg F2.s_far_Maddison_gdppc_1990_estima v2clrspct  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F2.s_mil_loggdp v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store g
xtreg F2.s_far_Maddison_gdppc_1990_estima v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store h
estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)


***
*Table A-12 
***

** Forward-lagging so that DV is measure in year t+20
xtreg F4.s_mil_gdp_grow v2clrspct  s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F4.gdppcgrowth_F_M v2clrspct  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F4.s_mil_gdp_grow v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store c
xtreg F4.gdppcgrowth_F_M v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store d
*equivalent specifications, with Ln GDP pc as DV
xtreg F4.s_mil_loggdp v2clrspct  s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg F4.s_far_Maddison_gdppc_1990_estima v2clrspct  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F4.s_mil_loggdp v2clrspct  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store g
xtreg F4.s_far_Maddison_gdppc_1990_estima v2clrspct  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store h
estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2clrspct Impartial_public_admin L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)





***
*Table A-14 
***
xtreg F.s_mil_gdp_grow v2stcritrecadm  s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F.gdppcgrowth_F_M v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F.s_mil_gdp_grow v2stcritrecadm  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store c
xtreg F.gdppcgrowth_F_M v2stcritrecadm  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store d
*equivalent specifications, with Ln GDP pc as DV
xtreg F.s_mil_loggdp v2stcritrecadm  s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg F.s_far_Maddison_gdppc_1990_estima v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F.s_mil_loggdp v2stcritrecadm  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store g
xtreg F.s_far_Maddison_gdppc_1990_estima v2stcritrecadm  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store h
estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2stcritrecadm Meritocratic_recruitment L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)


***
*Table A-15 
***
xtreg F2.s_mil_gdp_grow v2stcritrecadm  s_mil_loggdp i.year, fe cluster(country_id)
estimates store a
xtreg F2.gdppcgrowth_F_M v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F2.s_mil_gdp_grow v2stcritrecadm  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store c
xtreg F2.gdppcgrowth_F_M v2stcritrecadm  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store d
*equivalent specifications, with Ln GDP pc as DV
xtreg F2.s_mil_loggdp v2stcritrecadm  s_mil_loggdp i.year, fe cluster(country_id)
estimates store e
xtreg F2.s_far_Maddison_gdppc_1990_estima v2stcritrecadm  s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F2.s_mil_loggdp v2stcritrecadm  v2x_polyarchy s_mil_loggdp s_mil_lnpop s_mil_resdep2 i.year, fe cluster(country_id)
estimates store g
xtreg F2.s_far_Maddison_gdppc_1990_estima v2stcritrecadm  v2x_polyarchy s_far_Maddison_pop_estimate s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store h
estout a b c d e f g h, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f))) drop(_cons 1* 2*) rename(evra_weber Weberianism_Evans_Rauch s_mil_loggdp Ln_GDP_pc v2stcritrecadm Meritocratic_recruitment L30.absGDPpc GDP_pc L30.s_bl_25t_yr_sch Average_years_schooling) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)


